{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": 1,
  "links": [],
  "panels": [
    {
      "datasource": {
        "type": "grafana-postgresql-datasource",
        "uid": "ediy0f6cfe1vkf"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "fillOpacity": 70,
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "insertNulls": false,
            "lineWidth": 0,
            "spanNulls": false
          },
          "mappings": [
            {
              "options": {
                "ERROR_ACTIVE": {
                  "color": "semi-dark-red",
                  "index": 7
                },
                "ERROR_INACTIVE": {
                  "color": "light-red",
                  "index": 2
                },
                "FINISHED_ACTIVE": {
                  "color": "semi-dark-green",
                  "index": 6
                },
                "FINISHED_INACTIVE": {
                  "color": "light-green",
                  "index": 1
                },
                "FINISHED_TIMED_OUT": {
                  "color": "semi-dark-orange",
                  "index": 8
                },
                "STARTED_ACTIVE": {
                  "color": "semi-dark-blue",
                  "index": 4
                },
                "STARTED_INACTIVE": {
                  "color": "light-blue",
                  "index": 0
                },
                "TIMED_OUT": {
                  "color": "semi-dark-red",
                  "index": 5
                },
                "WAITING": {
                  "color": "light-yellow",
                  "index": 3
                }
              },
              "type": "value"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 15,
        "w": 19,
        "x": 0,
        "y": 0
      },
      "id": 1,
      "options": {
        "alignValue": "left",
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "showLegend": true
        },
        "mergeValues": true,
        "rowHeight": 0.9,
        "showValue": "auto",
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "grafana-postgresql-datasource",
            "uid": "ediy0f6cfe1vkf"
          },
          "editorMode": "builder",
          "format": "table",
          "rawSql": "SELECT report_code, event_time, status FROM report_status WHERE workday = '2024-04-22' LIMIT 50 ",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [
                  {
                    "name": "report_code",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              },
              {
                "parameters": [
                  {
                    "name": "event_time",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              },
              {
                "parameters": [
                  {
                    "name": "status",
                    "type": "functionParameter"
                  }
                ],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50,
            "whereJsonTree": {
              "children1": [
                {
                  "id": "8b8a9b89-4567-489a-bcde-f18ee8d187d9",
                  "properties": {
                    "field": "workday",
                    "fieldSrc": "field",
                    "operator": "equal",
                    "value": [
                      "2024-04-22"
                    ],
                    "valueSrc": [
                      "value"
                    ],
                    "valueType": [
                      "date"
                    ]
                  },
                  "type": "rule"
                }
              ],
              "id": "ababba88-0123-4456-b89a-b18ee8cf8187",
              "type": "group"
            },
            "whereString": "workday = '2024-04-22'"
          },
          "table": "report_status"
        }
      ],
      "title": "Статусы отчётов",
      "transformations": [
        {
          "id": "partitionByValues",
          "options": {
            "fields": [
              "report_code"
            ],
            "keepFields": false,
            "naming": {
              "asLabels": true
            }
          }
        }
      ],
      "transparent": true,
      "type": "state-timeline"
    }
  ],
  "schemaVersion": 39,
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-1h",
    "to": "now+2h"
  },
  "timepicker": {},
  "timezone": "browser",
  "title": "Report Status History",
  "uid": "ediggwvucfcaoe",
  "version": 4,
  "weekStart": ""
}